{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python_defaultSpec_1599618498830",
   "display_name": "Python 3.7.1 64-bit ('base': conda)"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pdb_profiling.utils import DisplayPDB"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": "Help on class DisplayPDB in module pdb_profiling.utils:\n\nclass DisplayPDB(builtins.object)\n |  DisplayPDB(*args)\n |  \n |  Methods defined here:\n |  \n |  __init__(self, *args)\n |      Initialize self.  See help(type(self)) for accurate signature.\n |  \n |  display(self, pdb_id, assemblies: Iterable[int] = [1])\n |  \n |  ----------------------------------------------------------------------\n |  Class methods defined here:\n |  \n |  setting(pdb_id, assemblies) from builtins.type\n |  \n |  ----------------------------------------------------------------------\n |  Data descriptors defined here:\n |  \n |  __dict__\n |      dictionary for instance variables (if defined)\n |  \n |  __weakref__\n |      list of weak references to the object (if defined)\n |  \n |  ----------------------------------------------------------------------\n |  Data and other attributes defined here:\n |  \n |  a_code = 'model-1'\n |  \n |  a_name = 'Asymmetric unit'\n |  \n |  b_code = 'assembly-{assembly_id}'\n |  \n |  b_name = 'Biological assembly {assembly_id}'\n |  \n |  content_unit = '\\n                <td>\\n                    <img w...p...\n |  \n |  header_unit = '\\n                <td>\\n                    <b>{name}</...\n |  \n |  template = '\\n        <table align=\"center\">\\n            <tr>...tent}...\n\n"
    }
   ],
   "source": [
    "help(DisplayPDB)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<IPython.core.display.HTML object>",
      "text/html": "\n        <table align=\"center\">\n            <tr>\n            \n                <td>\n                    <b>Asymmetric unit</b> of 1lo8\n                </td>\n    \n                <td>\n                    <b>Biological assembly 1</b> of 1lo8\n                </td>\n    \n            </tr>\n            <tr>\n            \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/lo/1lo8/1lo8_model-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/lo/1lo8/1lo8_assembly-1.jpeg\"/>\n                </td>\n    \n            </tr>\n        </table>\n        "
     },
     "metadata": {}
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "<pdb_profiling.utils.DisplayPDB at 0x27faf856ac8>"
     },
     "metadata": {},
     "execution_count": 3
    }
   ],
   "source": [
    "DisplayPDB('1lo8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<IPython.core.display.HTML object>",
      "text/html": "\n        <table align=\"center\">\n            <tr>\n            \n                <td>\n                    <b>Asymmetric unit</b> of 2h7c\n                </td>\n    \n                <td>\n                    <b>Biological assembly 1</b> of 2h7c\n                </td>\n    \n                <td>\n                    <b>Biological assembly 2</b> of 2h7c\n                </td>\n    \n                <td>\n                    <b>Biological assembly 3</b> of 2h7c\n                </td>\n    \n                <td>\n                    <b>Biological assembly 4</b> of 2h7c\n                </td>\n    \n            </tr>\n            <tr>\n            \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/h7/2h7c/2h7c_model-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/h7/2h7c/2h7c_assembly-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/h7/2h7c/2h7c_assembly-2.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/h7/2h7c/2h7c_assembly-3.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/h7/2h7c/2h7c_assembly-4.jpeg\"/>\n                </td>\n    \n            </tr>\n        </table>\n        "
     },
     "metadata": {}
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "<pdb_profiling.utils.DisplayPDB at 0x27faf87b2e8>"
     },
     "metadata": {},
     "execution_count": 4
    }
   ],
   "source": [
    "DisplayPDB('2h7c', [1,2,3,4])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<IPython.core.display.HTML object>",
      "text/html": "\n        <table align=\"center\">\n            <tr>\n            \n                <td>\n                    <b>Asymmetric unit</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 1</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 2</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 3</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 4</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 5</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 6</b> of 1m4x\n                </td>\n    \n                <td>\n                    <b>Biological assembly 7</b> of 1m4x\n                </td>\n    \n            </tr>\n            <tr>\n            \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_model-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-2.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-3.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-4.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-5.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-6.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/m4/1m4x/1m4x_assembly-7.jpeg\"/>\n                </td>\n    \n            </tr>\n        </table>\n        "
     },
     "metadata": {}
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "<pdb_profiling.utils.DisplayPDB at 0x27faf87b400>"
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "source": [
    "DisplayPDB('1m4x', [1,2,3,4,5,6,7])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/plain": "<IPython.core.display.HTML object>",
      "text/html": "\n        <table align=\"center\">\n            <tr>\n            \n                <td>\n                    <b>Asymmetric unit</b> of 3hl2\n                </td>\n    \n                <td>\n                    <b>Biological assembly 1</b> of 3hl2\n                </td>\n    \n                <td>\n                    <b>Biological assembly 2</b> of 3hl2\n                </td>\n    \n            </tr>\n            <tr>\n            \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/hl/3hl2/3hl2_model-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/hl/3hl2/3hl2_assembly-1.jpeg\"/>\n                </td>\n    \n                <td>\n                    <img width=\"300em\" src=\"https://cdn.rcsb.org/images/structures/hl/3hl2/3hl2_assembly-2.jpeg\"/>\n                </td>\n    \n            </tr>\n        </table>\n        "
     },
     "metadata": {}
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": "<pdb_profiling.utils.DisplayPDB at 0x27faf87b240>"
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "source": [
    "DisplayPDB('3hl2', [1,2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}